//
//  KLineSQLite.h
//  Chart
//
//  Created by CaoJun on 13-11-6.
//
//

#ifndef __Chart__GameMatrixSQLite__
#define __Chart__GameMatrixSQLite__

#include "BaseSQLite.h"
#include "GameMatrix.h"
#include <vector>
#include <string>

namespace ytx {

    class GameMatrixSQLite : public BaseSQLite{
    private:
        static std::vector<GameMatrixItem> transforDataGameMatrixItem(DBResult & dbResult);
    public:
        GameMatrixSQLite();
        virtual ~GameMatrixSQLite();
        bool insertData(std::string tableName, std::vector<GameMatrixItem> data);
//        bool checkInRange(std::string tableName, YTXTime * outputLastTime, GameMatrix * gm, YTXTime time);
        bool getDataFromDB(std::string tableName,YTXTime time, std::vector<GameMatrixItem> * gmItems, const unsigned int limit);
        bool createKLineDataTableIfNotExit(const std::string tableName);
        bool vacuumDB();
    };
}

#endif /* defined(__Chart__KLineSQLite__) */
